<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Many columns demo</title>

  <link rel="stylesheet" href="../../../demo/demo.css"/>
  <link rel="stylesheet" href="810-many-columns.css"/>

  <script src="../../../dist/jquery.min.js"></script>
  <script src="../../../dist/jquery-ui.min.js"></script>
  <script src="../../../src/gridstack.js"></script>
  <script src="../../../src/gridstack.jQueryUI.js"></script>
</head>
<body>
  <div class="container-fluid">
    <h1>Many Columns demo</h1>
    <div>
      <a class="btn btn-primary" onClick="addNewWidget()" href="#">Add Widget</a>
    </div>
    <br><br>
    <div class="grid-stack"></div>
  </div>


  <script type="text/javascript">
    const COLUMNS = 30; // # of columns, also need to update CSS
    var count = 0;
    var options = {
      column: COLUMNS,
      cellHeight: 'auto',
      float: false
    };
    var grid = GridStack.init(options);

    addNewWidget = function() {
      grid.addWidget('<div><div class="grid-stack-item-content">' + count + '</div></div>', {id: count});
      count++
    };

    for (; count <= COLUMNS;) {
      this.addNewWidget(); 
    }
  </script>
</body>
</html>
